const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electron', {
    minimize: () => ipcRenderer.send('minimize-window'),
    restore: () => ipcRenderer.send('restore-window'),
    onWindowSizeChanged: (callback) => {
        ipcRenderer.on('window-size-changed', (event, size) => callback(size));
    }
});